#include<stdio.h>

int main()
{
	int n = 0;
	scanf_s("%d", &n);
	int d = 3 * n;
	int c = 1;
	for (int i = 0; i < n; i++)
	{
		for (int a = d - 1; a > 0; a--)
		{
			printf(" ");
		}
		for (int j = 0; j <= i; j++)
		{
			printf("*     ");
		}
		printf("\n");
		for (int a = d - 2; a > 0; a--)
		{
			printf(" ");
		}
		for (int j = 0; j <= i; j++)
		{
			printf("* *   ");
		}
		printf("\n");
		for (int a = d - 3; a > 0; a--)
		{
			printf(" ");
		}
		for (int j = 0; j <= i; j++)
		{
			printf("* * * ");
		}
		printf("\n");
		d = d - 3;
	}
	while (c<=n)
	{
		for (int j = 0; j < (n * 6 - 1) / 2; j++)
		{
			printf(" ");
		}
		printf("*\n");
		c++;
	}
	return 0;
}